
import { lazy } from "react";
// import Car from "../views/car/Car";  // 懒加载 就不需要引路径
import Detail from "../views/detail/Detail";
import Home from "../views/home/Home";
import Login from "../views/login/Login";
import My from "../views/my/My";
import { Navigate } from "react-router-dom";
import DiZhi from "../components/DiZhi";
const Car=lazy(()=> import('../views/car/Car'))

export const routes=[
    {
        path:'/home',
        element:<Home></Home>
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/car',
        element:<Car></Car>
    },
    {
        path:'/detail/:proid',
        element:<Detail></Detail>
    },
    {
        path:'/my',
        element:<My></My>,
    },
    {
        path:'/dizhi',
        element:<DiZhi></DiZhi>
    },
    {
        path:'/',
        element:<Navigate to='/home'></Navigate>
    }
]